﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading;
//using System.Threading.Tasks;

//namespace Sgr.Domain.Uow
//{
//    /// <summary>
//    /// 事务抽象，与具体ORM无关
//    /// </summary>
//    public interface IUnitOfWorkTransaction : IDisposable, IAsyncDisposable
//    {
//        /// <summary>
//        /// 事务ID
//        /// </summary>
//        Guid TransactionId { get; }

//        /// <summary>
//        /// 是否活动事务
//        /// </summary>
//        bool IsActive { get; }

//        /// <summary>
//        /// 异步提交事务
//        /// </summary>
//        /// <param name="cancellationToken"></param>
//        /// <returns></returns>
//        Task CommitAsync(CancellationToken cancellationToken = default);

//        /// <summary>
//        /// 异步回滚事务
//        /// </summary>
//        /// <param name="cancellationToken"></param>
//        /// <returns></returns>
//        Task RollbackAsync(CancellationToken cancellationToken = default);
//    }
//}